﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Work3
{
    class Program
    {
        static void Main(string[] args)
        {
            int temp = 0;
            for (int i = 0; i <= 1000; i++)
            {
                if (i % 3 == 0 && i % 5 != 0)
                { 
                    for (int j = 0; j <3-i.ToString().Length; j++)
                    {
                        Console.Write(" ");
                    }
                    Console.Write(i);
                   
                    Console.Write("   ");
                    temp++;
                    if (temp%10==0)
                    {
                        Console.WriteLine(" ");
                    }
                }
                else
                {
                    continue;
                }
            }
            Console.WriteLine(" ");
            Console.WriteLine(" ");
            Console.WriteLine("总数为{0}", temp);
            Console.ReadKey();
        }
    }
}
